package org.example.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by zhaoq on   2024/7/16 16:07
 **/
@RestController
@RequestMapping(value = "/api/user")
public class UserController {

    @RequestMapping(value = "/getUserInfo1")
    public String getUserInfo1(HttpServletRequest request, HttpServletResponse response){
        request.getSession().setAttribute("loginUser", "userInfo");
        return "userInfo";
    }

    @RequestMapping(value = "/getUserInfo")
    public String getUserInfo(HttpServletRequest request, HttpServletResponse response){
        request.getSession().setAttribute("loginUser", "userInfo");
        return "userInfo";
    }
}
